#ifndef NETPOINTCONTROLDEVICE_H
#define NETPOINTCONTROLDEVICE_H

#include <QMap>

#include "BaseDevice.h"
#include "Protocol/NetPointProtocol.h"
#include "File/Xml/OtherEquipmentXml.h"
#include "Protocol/PointProtocol.h"
#include "Protocol/CloudProtocol.h"
class NetPointControlDevice : public BaseInterface<NetPointControlDevice>
{
    Q_OBJECT
public:
    Q_INVOKABLE explicit NetPointControlDevice(QObject *parent = 0);

private:
    PointProtocol *pointProtocol;
    CloudProtocol *cloudProtocol;
    PortStruct m_source;
    void controlPointCmdHandle(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void controlPointFuncHandle(QSharedPointer<BaseFunc> sharedFunc);
    void UDPSetSwitchReply(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void UdpPointRelayPost(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void PortRelayUDPpoint(PortStruct source,QSharedPointer<BaseCmd> sharedCmd);
    void heartBestHandled(PortStruct target,QSharedPointer<BaseCmd> sharedCmd);
    void SetSource(const PortStruct source);
    bool Function(QList<PointSwitchUdpStruct> list,quint16 addr,quint16 value);
};

#endif // NETPOINTCONTROLDEVICE_H
